-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated CoDICE XTCE files from imap_xtce tool #812
Updated CoDICE XTCE files from imap_xtce tool #812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I like the combination of these into a single file.
imap_processing/codice/codice_l0.py
Outdated
# TODO: Currently need to use the 'old' packet definition for housekeeping | ||
# because the test housekeeping packet has LAST_OPCODE=0, and the | ||
# telemetry definition "STATES" tab doesn't allow for a 0 value for | ||
# this. Need to figure out if the test packet is bad, or the telemetry | ||
# definition is wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting case. Does an Enumeration need to exist for every possible value or should space_packet_parser
just return the raw_value here and not decode anything rather than raising an error? Gavin might have some insight here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand from Gavin's comment in the xtce
slack channel, it sounds like his preference would be to explicitly define what a value of 0
means in the packet definition file. I will ask Joey about this in our next tagup.
imap_processing/codice/codice_l0.py
Outdated
packets: dict[int, xr.Dataset] = packet_file_to_datasets( | ||
packet_file, xtce_packet_definition | ||
) | ||
packets = packet_file_to_datasets(packet_file, xtce_packet_definition) | ||
|
||
return packets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you return the dataset now without assigning since it's not packets anymore? or this file itself might go away like mine did for SWE and SWAPI once your HK issue is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, this should really be called datasets
now instead of packets
. But I think I will keep the module around, at least for now, as a way to distinguish L0 code from L1 code.
<xtce:EnumeratedParameterType name="COD_NHK.LAST_OPCODE" signed="false"> | ||
<xtce:IntegerDataEncoding sizeInBits="16" encoding="unsigned" /> | ||
<xtce:EnumerationList> | ||
<xtce:Enumeration value="4096" label="COD_NOOP" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this to get around your above issue temporarily or will this cause issue later on?
<xtce:Enumeration value="4096" label="COD_NOOP" /> | |
<xtce:Enumeration value="0" label="TESTING" /> | |
<xtce:Enumeration value="4096" label="COD_NOOP" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on Gavin's comments I think this will likely be the workaround I go with, but I want to ask Joey about this first.
Nice consolidation! |
After discussing with Joey, a |
Change Summary
Overview
This PR updates the CoDICE XTCE files from running the new
imap_xtce
command line tool. As such, there is now a single telemetry definition file for all packet types. However, I need to retain the oldP_COD_NHK.xml
file until I can sort out a discrepancy with one of the fields that is causing an error (marked as aTODO
in the code).New Files
codice_packet_definition.xml
imap_xtce
toolDeleted Files
Updated Files
imap_processing/codice/codice_l0.py
imap_processing/codice/codice_l1a.py
codice_lo.decom_packets()
insteadimap_processing/codice/constants.py
Closes #768